{ "swagger": "2.0", "info": { "description": "API Rest gestion de autentificacion para la Universidad de Villamayor.", "version": "2.0.0", "title": "API Rest MS Gestion de Autenficacion de usuarios." }, "host": "localhost:9300", "basePath": "/", "paths": { "/login": { "post": { "tags": [" - Gestion de Authentificacion:"], "summary": "Iniciar sesion por NIF", "description": "", "operationId": "loginUser", "consumes": ["consumes application/x-www-form-urlencoded"], "produces": ["application/json"], "parameters": [{ "name": "nif", "in": "query", "description": "Introduca su NIF como usuario.", "required": true, "type": "string", "maxLength": 9, "minLength": 9, "pattern": "^([0-9]{8}|[XYZ]{1}[0-9]{7})[TRWAGMYFPDXBNJZSQVHLCKET]{1}$" }, { "name": "password", "in": "query", "description": "Introduca su contraseƱa de usuario.", "required": true, "type": "string", "format": "password" }], "responses": { "200": { "description": "Se Inicio la sesion correctamente", "content": { "application/json": { "schema": { "$ref": "#/definitions/Usuario" } } } }, "headers": { "X-Rate-Limit": { "type": "integer", "format": "int32", "description": "llamadas por hora permitidas por el usuario" }, "X-Expires-After": { "type": "string", "format": "date-time", "description": "Fecha en formato GMT en la que espira el token" } }, "400": { "description": "Error el NIF/contraseƱa es incorrecto" }, "403": { "description": "Aceso Denegado" }, "500": { "description": "Error Interno del Servidor" } }, "x-contentType": "consumes application/x-www-form-urlencoded", "x-accepts": "application/json" } }, "/logout": { "get": { "tags": [" - Gestion de Authentificacion:"], "summary": "Logs out current logged in user session", "description": "", "operationId": "logoutUser", "produces": ["application/json"], "parameters": [], "responses": { "default": { "description": "La sesion se ha cerrado correctamente" } }, "x-contentType": "application/json", "x-accepts": "application/json" } } }, "securityDefinitions": { "uvportal_auth": { "type": "oauth2", "authorizationUrl": "http://localhost:9300/login", "flow": "implicit", "scopes": { "write:pets": "modify pets in your account", "read:pets": "read your pets" } }, "api_key": { "type": "apiKey", "name": "api_key", "in": "header" } }, "definitions": { "Usuario": { "type": "object", "required": ["name", "nif", "tipo_user", "authTokent", "num_expediente"], "properties": { "name": { "type": "string" }, "nif": { "type": "string" }, "tipo_user": { "type": "string" }, "authTokent": { "type": "string" }, "num_expediente": { "type": "string" } } } } }